<style scoped>
.chart-line{
    width: 100%;
    height: 300px;
}
</style>
<template>
  <!-- 合同类型 -->
  <div id="box-chartline" class="chart-line"></div>
</template>
<script>
let echarts = require("echarts")
export default{
    name: 'ChartLine',
    data () {
        return{
            option : {
                tooltip: {
                    trigger: 'item'
                },
                legend: {
                    top: '5%',
                    left: 'center'
                },
                series: [
                    {
                    name: 'Access From',
                    type: 'pie',
                    radius: ['40%', '70%'],
                    avoidLabelOverlap: false,
                    itemStyle: {
                        borderRadius: 10,
                        borderColor: '#fff',
                        borderWidth: 2
                    },
                    label: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        label: {
                        show: true,
                        fontSize: '40',
                        fontWeight: 'bold'
                        }
                    },
                    labelLine: {
                        show: false
                    },
                    data: [
                        { value: 1048, name: '母婴护理' },
                        { value: 735, name: '伤口造口' },
                        { value: 580, name: '老年护理' },
                        { value: 484, name: '导管护理' },
                        { value: 300, name: '肿瘤护理' }
                    ]
                    }
                ]
                }

        }
    },
    mounted(){
        this.drawLine()
    },
    methods:{
        drawLine(){
            let myChart = echarts.init(document.getElementById("box-chartline"));
            myChart.setOption(this.option)
        }
    }
}
</script>